home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / BPC-TRTL.ZIP / TEST.PAS < prev    next >
Pascal/Delphi Source File  |  1995-05-30  |  703b  |  45 lines

  1. { This is the main demo program for TinyRTL }
  2.  
  3. Program TinyRTL_Test;
  4. {$R-,S-,Q-,I-,N-,E-}
  5.  
  6. procedure ShowText; assembler;
  7. const
  8.    Msg   :PChar =
  9.    'This text is shown using DOS ...'#9'Line #$';
  10. asm
  11.    mov  dx,word ptr Msg
  12.    mov  ah,9
  13.    int  21h
  14. end;
  15.  
  16. procedure ShowLine(Line                :Byte); assembler;
  17. const
  18.    Msg   :array [0..6] of Char =
  19.    #0#0#13#10'$';
  20. asm
  21.    mov  al,Line
  22.    aam
  23.    xchg al,ah
  24.    add  ax,'00'
  25.    mov  word ptr Msg,ax
  26.    mov  dx,offset Msg
  27.    mov  ah,9
  28.    int  21h
  29. end;
  30.  
  31. procedure Run;
  32. var
  33.    Line            :Byte;
  34. begin
  35.    for Line:=1 to 20 do
  36.    begin
  37.       ShowText;
  38.       ShowLine(Line);
  39.    end;
  40. end;
  41.  
  42. begin
  43.    Run;
  44. end.
  45.